Skip to content

Added fixes for QIF files with different date order and syntax#21

Open
jmcameron wants to merge 5 commits into
giacomos:masterfrom
jmcameron:master
Open

Added fixes for QIF files with different date order and syntax#21
jmcameron wants to merge 5 commits into
giacomos:masterfrom
jmcameron:master

Conversation

@jmcameron

Copy link
Copy Markdown

I ran into difficulties with QIF files exported by an old version of Quicken. Some of the numbers had embeded commas (for thousands separators) and the date as in DD/MM'YY format instead of MM/DD'YY format the code expects. I added a couple of class-level flags for this. Normal use should not change, but By giving extra (optional) arguments to the .parse() command, it handles my odd formats too.

I changed the Decimal(str) use to use a special function that removes the embedded thousands separators (commas by default, but overrideable) before doing the conversion to a flow. I only did it where I had difficulties (processing transactions); you may want to change the rest correspondingly.

@jmcameron

Copy link
Copy Markdown
Author

Converted more Decimal() calls to convertFloat() calls for values that should be floats.
Fixed issue to get test_parser regtests working (by converting transaction amounts back to strings with xxx.nn format. My guess is this has been broken since adding float() conversions (and stayed broken with Decimal() changes). The regtests pass for me. It would not hurt to add more tests with different flavors of QIF files.

@jmcameron

Copy link
Copy Markdown
Author

Regtests now pass on Travis CI!

@jmcameron

Copy link
Copy Markdown
Author

In the last update to this pull request, I added support the 'U' field (seems like another amount for transactions) and named it 'amount_U' since I could not find any documentation on it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant